package edu.joe.game;

import javax.media.opengl.GL2;

public class ShapeTools {

	public static void drawSprite(GL2 gl, double width, double height, float r, float g, float b) {
		float hwidth = (float) (width/2.0);
		float hheight= (float) (height/2.0);
		gl.glBegin(GL2.GL_TRIANGLES);
		gl.glColor3f(r, g, b);
		gl.glVertex3f(0, -hwidth, -hheight);
		gl.glColor3f(r, g, b);
		gl.glVertex3f(0, -hwidth, hheight);
		gl.glColor3f(r, g, b);
		gl.glVertex3f(0, hwidth, hheight);
		gl.glColor3f(r, g, b);
		gl.glVertex3f(0, hwidth, -hheight);
		gl.glEnd();
	}

}
